<?php
/**
 * Created by PhpStorm.
 * User: a
 * Date: 2016/6/2
 * Time: 17:18
 */

namespace Admin\Model;
use Think\Model;

class AuthorityModel extends Model{
    protected $trueTableName = 'bypal_comm_authority';

    /**
     * 查询菜单一级目录
     * @return mixed
     */
    public function get_authority_first_by_userid(){
        $sql="select authority_id,authority_name,authority_pid from bypal_comm_authority where authority_grade =1";
        $Model = new \Think\Model();
        $values=$Model->query($sql);
        return $values;
    }

    public function get_authority_second_by_userid(){
        $sql="select authority_id,authority_name,authority_pid,authority_url from bypal_comm_authority where authority_grade =2";
        $Model = new \Think\Model();
        $values=$Model->query($sql);
        return $values;
    }


}